<html>
<head>
<title>TrojkatProstokatny.java</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.ln { color: rgb(0,0,0); font-weight: normal; font-style: normal; }
.s0 { color: rgb(0,0,128); font-weight: bold; }
.s1 { }
.s2 { color: rgb(128,128,128); font-style: italic; }
.s3 { color: rgb(0,0,255); }
</style>
</head>
<BODY BGCOLOR="#ffffff">
<TABLE CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#C0C0C0" >
<TR><TD><CENTER>
<FONT FACE="Arial, Helvetica" COLOR="#000000">
TrojkatProstokatny.java</FONT>
</center></TD></TR></TABLE>
<pre>

<a name="l1"><span class="s0">package </span><span class="s1">wejscie_wyjscie; 
<a name="l2"> 
<a name="l3"></span><span class="s2">/** 
<a name="l4"> * Author: Daniel Michalski 
<a name="l5"> * Date: 26.02.13 
<a name="l6"> */</span><span class="s1"> 
<a name="l7"> 
<a name="l8"></span><span class="s0">public class </span><span class="s1">TrojkatProstokatny { 
<a name="l9">    </span><span class="s0">private double </span><span class="s1">bokA, bokB; 
<a name="l10"> 
<a name="l11">    </span><span class="s0">public </span><span class="s1">TrojkatProstokatny(</span><span class="s0">double </span><span class="s1">bokA, </span><span class="s0">double </span><span class="s1">bokB) { 
<a name="l12">        </span><span class="s0">this</span><span class="s1">.bokA=bokA; 
<a name="l13">        </span><span class="s0">this</span><span class="s1">.bokB=bokB; 
<a name="l14">    } 
<a name="l15"> 
<a name="l16">    </span><span class="s0">public double </span><span class="s1">obliczPrzeciwprostokatna(){ 
<a name="l17">        </span><span class="s0">double </span><span class="s1">dlPrzeciwprostokatnej = Math.sqrt(Math.pow(bokA, </span><span class="s3">2</span><span class="s1">) + Math.pow(bokB, </span><span class="s3">2</span><span class="s1">)); 
<a name="l18">        </span><span class="s0">return </span><span class="s1">dlPrzeciwprostokatnej; 
<a name="l19">    } 
<a name="l20"> 
<a name="l21">} 
<a name="l22"></span></pre>
</body>
</html>